widget: Inline function into only caller
authorBenjamin Otte <otte@redhat.com>
Tue, 18 Oct 2016 17:42:19 +0000 (19:42 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 27 Oct 2016 03:07:23 +0000 (05:07 +0200)
... and remove all the checks that are not needed in this case.

gtk/gtkwidget.c

index 14ea19567b2752eb0f3a62625176e2b153a90971..3ec848d30a3ca3e9f79b9b0854097857e589bcc9 100644 (file)
@@ -4057,21 +4057,6 @@ gtk_widget_new (GType        type,
   return widget;
 }
 
-static inline void
-gtk_widget_queue_draw_child (GtkWidget *widget)
-{
-  GtkWidgetPrivate *priv = widget->priv;
-  GtkWidget *parent;
-
-  parent = priv->parent;
-  if (parent && _gtk_widget_is_drawable (parent))
-    gtk_widget_queue_draw_area (parent,
-                               priv->clip.x,
-                               priv->clip.y,
-                               priv->clip.width,
-                               priv->clip.height);
-}
-
 /**
  * gtk_widget_unparent:
  * @widget: a #GtkWidget
@@ -4109,7 +4094,12 @@ gtk_widget_unparent (GtkWidget *widget)
   if (gtk_container_get_focus_child (GTK_CONTAINER (priv->parent)) == widget)
     gtk_container_set_focus_child (GTK_CONTAINER (priv->parent), NULL);
 
-  gtk_widget_queue_draw_child (widget);
+  if (_gtk_widget_is_drawable (priv->parent))
+    gtk_widget_queue_draw_area (priv->parent,
+                               priv->clip.x,
+                               priv->clip.y,
+                               priv->clip.width,
+                               priv->clip.height);
 
   /* Reset the width and height here, to force reallocation if we
    * get added back to a new parent. This won't work if our new